﻿
namespace MyFurion.Application.Dtos
{
    /// <summary>
    /// 角色查询条件
    /// </summary>
    public  class RoleInfoPage:PageBaseInput
    {
        /// <summary>
        /// 角色编码
        /// </summary>
        public string RoleCode { get; set; }
        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleName { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public EnumStatus?Status { get; set; }
    }
    /// <summary>
    /// 角色新增信息
    /// </summary>
    public class RoleInfoAdd
    {
        /// <summary>
        /// 角色编码
        /// </summary>
        [Required(ErrorMessage = "角色编码不能为空")]
        public string RoleCode { get; set; }
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required(ErrorMessage = "角色名称不能为空")]
        public string RoleName { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required(ErrorMessage = "状态不能为空")]
        public EnumStatus Status { get; set; }
        /// <summary>
        /// 机构数据权限 默认本部门
        /// </summary>
        [Required(ErrorMessage = "机构数据权限不能为空")]
        public EnumOrgAuthority OrgAuthority { get; set; }
        /// <summary>
        /// 权限机构ids
        /// </summary>
        public List<long> OrgAuthorityIds { get; set; } = new();
    }
    /// <summary>
    /// 角色修改信息
    /// </summary>
    public class RoleInfoUpdate: RoleInfoAdd
    {
        /// <summary>
        /// id
        /// </summary>
        public long Id { get; set; }
    }
    /// <summary>
    /// 角色菜单权限
    /// </summary>
    public class RoleMenuRight
    {
        /// <summary>
        /// 角色id
        /// </summary>
        public long RoleId { get; set; }
        /// <summary>
        /// 菜单id
        /// </summary>
        public List<long> MenuIds { get; set; } = new();
    }
    /// <summary>
    /// 机构数据权限
    /// </summary>
    public class RoleOrgRight
    {
        /// <summary>
        /// 角色id
        /// </summary>
        public long RoleId { get; set; }
        /// <summary>
        /// 菜单id
        /// </summary>
        public List<long> OrgIds { get; set; } = new();
    }
}
